﻿using Bids.Core.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.OpenAccess;
using Telerik.OpenAccess.Metadata;
using Telerik.OpenAccess.Metadata.Fluent;
namespace Bids.Core.DomainObjects
{
	/// <summary>
	/// 登录表
	/// </summary>
	[Serializable]
	public class Login : IEntity
	{
		
		/// <summary>
		/// USERID
		/// </summary>
        public virtual int ID { set; get; }
		/// <summary>
		/// 用户名
		/// </summary>
        public virtual string UserName { set; get; }
		/// <summary>
		/// 密码
		/// </summary>
        public virtual string Password { set; get; }
        public virtual User User { get; set; }
        public static MappingConfiguration<Login> CreateConfiguration()
        {
            var threadMapping = new MappingConfiguration<Login>();
            threadMapping.MapType(t => new
            {
                t.ID,
                t.UserName,
                t.Password
            }).ToTable("Logins");
            threadMapping.HasProperty(t => t.ID).IsIdentity();
            return threadMapping;
        }
	}
}

